package com.teamall.web.sys.db.arg;

import java.util.*;
import java.math.*;
import org.apache.commons.lang.*;

public class DataDictArg {
    private String pk_name = "DATA_ID";

    private String orderByClause;

    private String groupByClause;

    private String columns;

    private String countsql1;

    private String countsql2;

    private boolean distinct;

    private int rowStart = 0;

    private int rowEnd = 10;

    private List<DataDictCriteria> oredCriteria;

    public DataDictArg() {
        oredCriteria = new ArrayList<DataDictCriteria>();
    }

    public void setPk_name(String pk_name) {
        this.pk_name = StringEscapeUtils.escapeSql(pk_name);
    }

    public String getPk_name() {
        return pk_name;
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = StringEscapeUtils.escapeSql(orderByClause);
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setGroupByClause(String groupByClause) {
        this.groupByClause = StringEscapeUtils.escapeSql(groupByClause);
    }

    public String geGroupByClause() {
        return groupByClause;
    }

    public void setColumns(String columns) {
        this.columns = StringEscapeUtils.escapeSql(columns);
    }

    public String geColumns() {
        return columns;
    }

    public void setCountsql1(String countsql1) {
        this.countsql1 = StringEscapeUtils.escapeSql(countsql1);
    }

    public String geCountsql1() {
        return countsql1;
    }

    public void setCountsql2(String countsql2) {
        this.countsql2 = StringEscapeUtils.escapeSql(countsql2);
    }

    public String geCountsql2() {
        return countsql2;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public void setRowStart(int rowStart) {
        this.rowStart = rowStart;
    }

    public void setRowEnd(int rowEnd) {
        this.rowEnd = rowEnd;
    }

    public int getRowStart() {
        return rowStart;
    }

    public int getRowEnd() {
        return rowEnd;
    }

    public List<DataDictCriteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(DataDictCriteria criteria) {
        oredCriteria.add(criteria);
    }

    public DataDictCriteria or() {
    	DataDictCriteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public DataDictCriteria createCriteria() {
    	DataDictCriteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected DataDictCriteria createCriteriaInternal() {
    	DataDictCriteria criteria = new DataDictCriteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        groupByClause = null;
        columns = null;
        countsql1 = null;
        countsql2 = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<DataDictCriterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<DataDictCriterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<DataDictCriterion> getAllCriteria() {
            return criteria;
        }

        public List<DataDictCriterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new DataDictCriterion(condition));
        }

        protected void addCriterion(String condition, Object value,
                String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property
                        + " cannot be null");
            }
            criteria.add(new DataDictCriterion(condition, value));
        }

        protected void addCriterion(String condition, Object value,
                String property, int likeType) {
            if (value == null) {
                throw new RuntimeException("Value for " + property
                        + " cannot be null");
            }
            criteria.add(new DataDictCriterion(condition, value, likeType));
        }

        protected void addCriterion(String condition, Object value1,
                Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property
                        + " cannot be null");
            }
            criteria.add(new DataDictCriterion(condition, value1, value2));
        }

        public DataDictCriteria andCriterionEqualTo(String criterion) {
            if (StringUtils.isBlank(criterion)) {
                criterion = "1=1";
            }
            addCriterion(criterion);
            return (DataDictCriteria) this;
        }
        public DataDictCriteria andDataIdIsNull() {
            addCriterion("DATA_ID is null");
            return (DataDictCriteria) this;
        }

        public DataDictCriteria andDataIdIsNotNull() {
            addCriterion("DATA_ID is not null");
            return (DataDictCriteria) this;
        }

        public DataDictCriteria andDataIdEqualTo(Integer value) {
            addCriterion("DATA_ID =", value, "DATA_ID");
            return (DataDictCriteria) this;
        }

        public DataDictCriteria andDataIdNotEqualTo(Integer value) {
            addCriterion("DATA_ID <>", value, "DATA_ID");
            return (DataDictCriteria) this;
        }

        public DataDictCriteria andDataIdGreaterThan(Integer value) {
            addCriterion("DATA_ID >", value, "DATA_ID");
            return (DataDictCriteria) this;
        }

        public DataDictCriteria andDataIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("DATA_ID >=", value, "DATA_ID");
            return (DataDictCriteria) this;
        }

        public DataDictCriteria andDataIdLessThan(Integer value) {
            addCriterion("DATA_ID <", value, "DATA_ID");
            return (DataDictCriteria) this;
        }

        public DataDictCriteria andDataIdLessThanOrEqualTo(Integer value) {
            addCriterion("DATA_ID <=", value, "DATA_ID");
            return (DataDictCriteria) this;
        }

        public DataDictCriteria andDataIdLike(Integer value) {
            addCriterion("DATA_ID like ", value, "DATA_ID", 1);
            return (DataDictCriteria) this;
        }

        public DataDictCriteria andDataIdNotLike(Integer value) {
            addCriterion("DATA_ID  not like ", value, "DATA_ID", 1);
            return (DataDictCriteria) this;
        }

        public DataDictCriteria andDataIdLeftLike(Integer value) {
            addCriterion("DATA_ID like ", value, "DATA_ID", 0);
            return (DataDictCriteria) this;
        }

        public DataDictCriteria andDataIdNotLeftLike(Integer value) {
            addCriterion("DATA_ID  not like ", value, "DATA_ID", 0);
            return (DataDictCriteria) this;
        }

        public DataDictCriteria andDataIdRightLike(Integer value) {
            addCriterion("DATA_ID like ", value, "DATA_ID", 2);
            return (DataDictCriteria) this;
        }

        public DataDictCriteria andDataIdNotRightLike(Integer value) {
            addCriterion("DATA_ID  not like ", value, "DATA_ID", 2);
            return (DataDictCriteria) this;
        }

        public DataDictCriteria andDataIdIn(List<Integer> values) {
            addCriterion("DATA_ID  in ", values, "DATA_ID");
            return (DataDictCriteria) this;
        }

        public DataDictCriteria andDataIdNotIn(List<Integer> values) {
            addCriterion("DATA_ID not in ", values, "DATA_ID");
            return (DataDictCriteria) this;
        }

        public DataDictCriteria andDataIdBetween(Integer value1, Integer value2) {
            addCriterion("DATA_ID between ", value1, value2, "DATA_ID");
            return (DataDictCriteria) this;
        }

        public DataDictCriteria andDataIdNotBetween(Integer value1, Integer value2) {
            addCriterion("DATA_ID not between ", value1, value2, "DATA_ID");
            return (DataDictCriteria) this;
        }
        public DataDictCriteria andDataKeyIsNull() {
            addCriterion("DATA_KEY is null");
            return (DataDictCriteria) this;
        }

        public DataDictCriteria andDataKeyIsNotNull() {
            addCriterion("DATA_KEY is not null");
            return (DataDictCriteria) this;
        }

        public DataDictCriteria andDataKeyEqualTo(Integer value) {
            addCriterion("DATA_KEY =", value, "DATA_KEY");
            return (DataDictCriteria) this;
        }

        public DataDictCriteria andDataKeyNotEqualTo(Integer value) {
            addCriterion("DATA_KEY <>", value, "DATA_KEY");
            return (DataDictCriteria) this;
        }

        public DataDictCriteria andDataKeyGreaterThan(Integer value) {
            addCriterion("DATA_KEY >", value, "DATA_KEY");
            return (DataDictCriteria) this;
        }

        public DataDictCriteria andDataKeyGreaterThanOrEqualTo(Integer value) {
            addCriterion("DATA_KEY >=", value, "DATA_KEY");
            return (DataDictCriteria) this;
        }

        public DataDictCriteria andDataKeyLessThan(Integer value) {
            addCriterion("DATA_KEY <", value, "DATA_KEY");
            return (DataDictCriteria) this;
        }

        public DataDictCriteria andDataKeyLessThanOrEqualTo(Integer value) {
            addCriterion("DATA_KEY <=", value, "DATA_KEY");
            return (DataDictCriteria) this;
        }

        public DataDictCriteria andDataKeyLike(Integer value) {
            addCriterion("DATA_KEY like ", value, "DATA_KEY", 1);
            return (DataDictCriteria) this;
        }

        public DataDictCriteria andDataKeyNotLike(Integer value) {
            addCriterion("DATA_KEY  not like ", value, "DATA_KEY", 1);
            return (DataDictCriteria) this;
        }

        public DataDictCriteria andDataKeyLeftLike(Integer value) {
            addCriterion("DATA_KEY like ", value, "DATA_KEY", 0);
            return (DataDictCriteria) this;
        }

        public DataDictCriteria andDataKeyNotLeftLike(Integer value) {
            addCriterion("DATA_KEY  not like ", value, "DATA_KEY", 0);
            return (DataDictCriteria) this;
        }

        public DataDictCriteria andDataKeyRightLike(Integer value) {
            addCriterion("DATA_KEY like ", value, "DATA_KEY", 2);
            return (DataDictCriteria) this;
        }

        public DataDictCriteria andDataKeyNotRightLike(Integer value) {
            addCriterion("DATA_KEY  not like ", value, "DATA_KEY", 2);
            return (DataDictCriteria) this;
        }

        public DataDictCriteria andDataKeyIn(List<Integer> values) {
            addCriterion("DATA_KEY  in ", values, "DATA_KEY");
            return (DataDictCriteria) this;
        }

        public DataDictCriteria andDataKeyNotIn(List<Integer> values) {
            addCriterion("DATA_KEY not in ", values, "DATA_KEY");
            return (DataDictCriteria) this;
        }

        public DataDictCriteria andDataKeyBetween(Integer value1, Integer value2) {
            addCriterion("DATA_KEY between ", value1, value2, "DATA_KEY");
            return (DataDictCriteria) this;
        }

        public DataDictCriteria andDataKeyNotBetween(Integer value1, Integer value2) {
            addCriterion("DATA_KEY not between ", value1, value2, "DATA_KEY");
            return (DataDictCriteria) this;
        }
        public DataDictCriteria andDataGroupIsNull() {
            addCriterion("DATA_GROUP is null");
            return (DataDictCriteria) this;
        }

        public DataDictCriteria andDataGroupIsNotNull() {
            addCriterion("DATA_GROUP is not null");
            return (DataDictCriteria) this;
        }

        public DataDictCriteria andDataGroupEqualTo(Integer value) {
            addCriterion("DATA_GROUP =", value, "DATA_GROUP");
            return (DataDictCriteria) this;
        }

        public DataDictCriteria andDataGroupNotEqualTo(Integer value) {
            addCriterion("DATA_GROUP <>", value, "DATA_GROUP");
            return (DataDictCriteria) this;
        }

        public DataDictCriteria andDataGroupGreaterThan(Integer value) {
            addCriterion("DATA_GROUP >", value, "DATA_GROUP");
            return (DataDictCriteria) this;
        }

        public DataDictCriteria andDataGroupGreaterThanOrEqualTo(Integer value) {
            addCriterion("DATA_GROUP >=", value, "DATA_GROUP");
            return (DataDictCriteria) this;
        }

        public DataDictCriteria andDataGroupLessThan(Integer value) {
            addCriterion("DATA_GROUP <", value, "DATA_GROUP");
            return (DataDictCriteria) this;
        }

        public DataDictCriteria andDataGroupLessThanOrEqualTo(Integer value) {
            addCriterion("DATA_GROUP <=", value, "DATA_GROUP");
            return (DataDictCriteria) this;
        }

        public DataDictCriteria andDataGroupLike(Integer value) {
            addCriterion("DATA_GROUP like ", value, "DATA_GROUP", 1);
            return (DataDictCriteria) this;
        }

        public DataDictCriteria andDataGroupNotLike(Integer value) {
            addCriterion("DATA_GROUP  not like ", value, "DATA_GROUP", 1);
            return (DataDictCriteria) this;
        }

        public DataDictCriteria andDataGroupLeftLike(Integer value) {
            addCriterion("DATA_GROUP like ", value, "DATA_GROUP", 0);
            return (DataDictCriteria) this;
        }

        public DataDictCriteria andDataGroupNotLeftLike(Integer value) {
            addCriterion("DATA_GROUP  not like ", value, "DATA_GROUP", 0);
            return (DataDictCriteria) this;
        }

        public DataDictCriteria andDataGroupRightLike(Integer value) {
            addCriterion("DATA_GROUP like ", value, "DATA_GROUP", 2);
            return (DataDictCriteria) this;
        }

        public DataDictCriteria andDataGroupNotRightLike(Integer value) {
            addCriterion("DATA_GROUP  not like ", value, "DATA_GROUP", 2);
            return (DataDictCriteria) this;
        }

        public DataDictCriteria andDataGroupIn(List<Integer> values) {
            addCriterion("DATA_GROUP  in ", values, "DATA_GROUP");
            return (DataDictCriteria) this;
        }

        public DataDictCriteria andDataGroupNotIn(List<Integer> values) {
            addCriterion("DATA_GROUP not in ", values, "DATA_GROUP");
            return (DataDictCriteria) this;
        }

        public DataDictCriteria andDataGroupBetween(Integer value1, Integer value2) {
            addCriterion("DATA_GROUP between ", value1, value2, "DATA_GROUP");
            return (DataDictCriteria) this;
        }

        public DataDictCriteria andDataGroupNotBetween(Integer value1, Integer value2) {
            addCriterion("DATA_GROUP not between ", value1, value2, "DATA_GROUP");
            return (DataDictCriteria) this;
        }
        public DataDictCriteria andDataNameIsNull() {
            addCriterion("DATA_NAME is null");
            return (DataDictCriteria) this;
        }

        public DataDictCriteria andDataNameIsNotNull() {
            addCriterion("DATA_NAME is not null");
            return (DataDictCriteria) this;
        }

        public DataDictCriteria andDataNameEqualTo(String value) {
            addCriterion("DATA_NAME =", value, "DATA_NAME");
            return (DataDictCriteria) this;
        }

        public DataDictCriteria andDataNameNotEqualTo(String value) {
            addCriterion("DATA_NAME <>", value, "DATA_NAME");
            return (DataDictCriteria) this;
        }

        public DataDictCriteria andDataNameGreaterThan(String value) {
            addCriterion("DATA_NAME >", value, "DATA_NAME");
            return (DataDictCriteria) this;
        }

        public DataDictCriteria andDataNameGreaterThanOrEqualTo(String value) {
            addCriterion("DATA_NAME >=", value, "DATA_NAME");
            return (DataDictCriteria) this;
        }

        public DataDictCriteria andDataNameLessThan(String value) {
            addCriterion("DATA_NAME <", value, "DATA_NAME");
            return (DataDictCriteria) this;
        }

        public DataDictCriteria andDataNameLessThanOrEqualTo(String value) {
            addCriterion("DATA_NAME <=", value, "DATA_NAME");
            return (DataDictCriteria) this;
        }

        public DataDictCriteria andDataNameLike(String value) {
            addCriterion("DATA_NAME like ", value, "DATA_NAME", 1);
            return (DataDictCriteria) this;
        }

        public DataDictCriteria andDataNameNotLike(String value) {
            addCriterion("DATA_NAME  not like ", value, "DATA_NAME", 1);
            return (DataDictCriteria) this;
        }

        public DataDictCriteria andDataNameLeftLike(String value) {
            addCriterion("DATA_NAME like ", value, "DATA_NAME", 0);
            return (DataDictCriteria) this;
        }

        public DataDictCriteria andDataNameNotLeftLike(String value) {
            addCriterion("DATA_NAME  not like ", value, "DATA_NAME", 0);
            return (DataDictCriteria) this;
        }

        public DataDictCriteria andDataNameRightLike(String value) {
            addCriterion("DATA_NAME like ", value, "DATA_NAME", 2);
            return (DataDictCriteria) this;
        }

        public DataDictCriteria andDataNameNotRightLike(String value) {
            addCriterion("DATA_NAME  not like ", value, "DATA_NAME", 2);
            return (DataDictCriteria) this;
        }

        public DataDictCriteria andDataNameIn(List<String> values) {
            addCriterion("DATA_NAME  in ", values, "DATA_NAME");
            return (DataDictCriteria) this;
        }

        public DataDictCriteria andDataNameNotIn(List<String> values) {
            addCriterion("DATA_NAME not in ", values, "DATA_NAME");
            return (DataDictCriteria) this;
        }

        public DataDictCriteria andDataNameBetween(String value1, String value2) {
            addCriterion("DATA_NAME between ", value1, value2, "DATA_NAME");
            return (DataDictCriteria) this;
        }

        public DataDictCriteria andDataNameNotBetween(String value1, String value2) {
            addCriterion("DATA_NAME not between ", value1, value2, "DATA_NAME");
            return (DataDictCriteria) this;
        }
        public DataDictCriteria andDataDescIsNull() {
            addCriterion("DATA_DESC is null");
            return (DataDictCriteria) this;
        }

        public DataDictCriteria andDataDescIsNotNull() {
            addCriterion("DATA_DESC is not null");
            return (DataDictCriteria) this;
        }

        public DataDictCriteria andDataDescEqualTo(String value) {
            addCriterion("DATA_DESC =", value, "DATA_DESC");
            return (DataDictCriteria) this;
        }

        public DataDictCriteria andDataDescNotEqualTo(String value) {
            addCriterion("DATA_DESC <>", value, "DATA_DESC");
            return (DataDictCriteria) this;
        }

        public DataDictCriteria andDataDescGreaterThan(String value) {
            addCriterion("DATA_DESC >", value, "DATA_DESC");
            return (DataDictCriteria) this;
        }

        public DataDictCriteria andDataDescGreaterThanOrEqualTo(String value) {
            addCriterion("DATA_DESC >=", value, "DATA_DESC");
            return (DataDictCriteria) this;
        }

        public DataDictCriteria andDataDescLessThan(String value) {
            addCriterion("DATA_DESC <", value, "DATA_DESC");
            return (DataDictCriteria) this;
        }

        public DataDictCriteria andDataDescLessThanOrEqualTo(String value) {
            addCriterion("DATA_DESC <=", value, "DATA_DESC");
            return (DataDictCriteria) this;
        }

        public DataDictCriteria andDataDescLike(String value) {
            addCriterion("DATA_DESC like ", value, "DATA_DESC", 1);
            return (DataDictCriteria) this;
        }

        public DataDictCriteria andDataDescNotLike(String value) {
            addCriterion("DATA_DESC  not like ", value, "DATA_DESC", 1);
            return (DataDictCriteria) this;
        }

        public DataDictCriteria andDataDescLeftLike(String value) {
            addCriterion("DATA_DESC like ", value, "DATA_DESC", 0);
            return (DataDictCriteria) this;
        }

        public DataDictCriteria andDataDescNotLeftLike(String value) {
            addCriterion("DATA_DESC  not like ", value, "DATA_DESC", 0);
            return (DataDictCriteria) this;
        }

        public DataDictCriteria andDataDescRightLike(String value) {
            addCriterion("DATA_DESC like ", value, "DATA_DESC", 2);
            return (DataDictCriteria) this;
        }

        public DataDictCriteria andDataDescNotRightLike(String value) {
            addCriterion("DATA_DESC  not like ", value, "DATA_DESC", 2);
            return (DataDictCriteria) this;
        }

        public DataDictCriteria andDataDescIn(List<String> values) {
            addCriterion("DATA_DESC  in ", values, "DATA_DESC");
            return (DataDictCriteria) this;
        }

        public DataDictCriteria andDataDescNotIn(List<String> values) {
            addCriterion("DATA_DESC not in ", values, "DATA_DESC");
            return (DataDictCriteria) this;
        }

        public DataDictCriteria andDataDescBetween(String value1, String value2) {
            addCriterion("DATA_DESC between ", value1, value2, "DATA_DESC");
            return (DataDictCriteria) this;
        }

        public DataDictCriteria andDataDescNotBetween(String value1, String value2) {
            addCriterion("DATA_DESC not between ", value1, value2, "DATA_DESC");
            return (DataDictCriteria) this;
        }

    }

    public static class DataDictCriteria extends GeneratedCriteria {

        protected DataDictCriteria() {
            super();
        }
    }

    public static class DataDictCriterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected DataDictCriterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }
        protected DataDictCriterion(String condition, Object value, int likeType) {
            this.condition = condition;
            if (likeType == 0) {
                this.value = "%" + value;
            }
            else if (likeType == 1) {
                this.value = "%" + value + "%";
            }
            else {
                this.value = value + "%";
            }
            this.typeHandler = null;
            this.singleValue = true;

        }

        protected DataDictCriterion(String condition, Object value,
                String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            }
            else {
                this.singleValue = true;
            }
        }

        protected DataDictCriterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected DataDictCriterion(String condition, Object value,
                Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected DataDictCriterion(String condition, Object value,
                Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}